home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Educational / Henon / Source / HenonView.h < prev    next >
Encoding:
Text File  |  1995-06-12  |  2.0 KB  |  106 lines

  1. //
  2. //    HenonView:View
  3. //
  4. //    written by Anders Bertelrud
  5. //    (c) 1990, 1991 by Anders Bertelrud
  6. //
  7.  
  8.  
  9. #import <appkit/View.h>
  10.  
  11.  
  12. typedef    id    id0;        // id0's are id's that don't get parsed by IB
  13.  
  14.  
  15. @interface HenonView:View
  16. {
  17.     // Outlets to views in the Hénon panel.
  18.     id                orbitField;
  19.     id                pointsField;
  20.     id                incYField;
  21.     id                incXField;
  22.     id                startYField;
  23.     id                startXField;
  24.     id                phaseField;
  25.     id                phaseSlider;
  26.     id                currentOrbitField;
  27.     id                nextOrbitButton;
  28.     id                lField;
  29.     id                tField;
  30.     id                rField;
  31.     id                bField;
  32.     id                startStopButton;
  33.  
  34.     // Other outlets.
  35.     id                stringTable;
  36.  
  37.     // Things to keep track of the timer.
  38.     DPSTimedEntry    timer;
  39.     BOOL            timerTicking;
  40.  
  41.     // Things controlling the mapping cache image.
  42.     id0                henonCache;
  43.  
  44.     // Various flags. 
  45.     BOOL            useGrid;
  46.     BOOL            continuousPlot;
  47.     BOOL            isRunning;
  48.  
  49.     // Input used in the Hénon mapping calculations.
  50.     float            L, T, R, B, x0, y0, dx0, dy0, phase;
  51.     int                orbits, points;
  52.  
  53.     // Other variables used in the Hénon mapping calculations.
  54.     float            cosa, sina, xOld, yOld, xScale, yScale;
  55.     int                currentOrbit, currentPoint;
  56. }
  57.  
  58.  
  59.  
  60. ////////////////////// Creation & Destruction Methods //////////////////////
  61.  
  62. - initFrame:(const NXRect *)f;
  63. - free;
  64.  
  65.  
  66. //////////////////////////// Rendering Methods /////////////////////////////
  67.  
  68. - drawSelf:(const NXRect *)rects :(int)rectCount;
  69.  
  70.  
  71. /////////////////////////////// File Methods ///////////////////////////////
  72.  
  73. - saveAsTIFF:sender;
  74.  
  75.  
  76. ////////////////////////////// Action Methods //////////////////////////////
  77.  
  78. ///// From buttons in the Hénon panel /////
  79. - startStop:sender;
  80. - gridChecked:sender;
  81. - nextOrbit:sender;
  82.  
  83. ///// From menu items /////
  84. - setPlotValues1:sender;
  85. - setPlotValues2:sender;
  86. - setPlotValues3:sender;
  87.  
  88.  
  89. ////////////////////////////// Timer Methods ///////////////////////////////
  90.  
  91. - startTimer;
  92. - stopTimer;
  93.  
  94.  
  95. ////////////////////////// Miscellaneous Methods ///////////////////////////
  96.  
  97. - initHenonCache;
  98. - doHenonCalculation;
  99.  
  100.  
  101. //////////////////////////// Delegation Methods ////////////////////////////
  102.  
  103. - appDidInit:sender;
  104.  
  105.  
  106. @end